package com.ruoyi.system.service.impl;

import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.InvoiceRecordsVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.InvoiceRecordsMapper;
import com.ruoyi.system.domain.InvoiceRecords;
import com.ruoyi.system.service.IInvoiceRecordsService;

/**
 * 开票明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-25
 */
@Service
public class InvoiceRecordsServiceImpl implements IInvoiceRecordsService 
{
    @Autowired
    private InvoiceRecordsMapper invoiceRecordsMapper;

    /**
     * 查询开票明细
     * 
     * @param id 开票明细主键
     * @return 开票明细
     */
    @Override
    public InvoiceRecords selectInvoiceRecordsById(Long id)
    {
        return invoiceRecordsMapper.selectInvoiceRecordsById(id);
    }

    /**
     * 查询开票明细列表
     * 
     * @param invoiceRecords 开票明细
     * @return 开票明细
     */
    @Override
    public List<InvoiceRecords> selectInvoiceRecordsList(InvoiceRecords invoiceRecords)
    {
        return invoiceRecordsMapper.selectInvoiceRecordsList(invoiceRecords);
    }

    @Override
    public List<InvoiceRecordsVo> selectInvoiceProvideRecordsList(InvoiceRecords invoiceRecords) {
        return invoiceRecordsMapper.selectInvoiceProvideRecordsList(invoiceRecords);
    }

    /**
     * 新增开票明细
     * 
     * @param invoiceRecords 开票明细
     * @return 结果
     */
    @Override
    public int insertInvoiceRecords(InvoiceRecords invoiceRecords)
    {
        return invoiceRecordsMapper.insertInvoiceRecords(invoiceRecords);
    }

    /**
     * 修改开票明细
     * 
     * @param invoiceRecords 开票明细
     * @return 结果
     */
    @Override
    public int updateInvoiceRecords(InvoiceRecords invoiceRecords)
    {
        return invoiceRecordsMapper.updateInvoiceRecords(invoiceRecords);
    }

    /**
     * 批量删除开票明细
     * 
     * @param ids 需要删除的开票明细主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceRecordsByIds(Long[] ids)
    {
        return invoiceRecordsMapper.deleteInvoiceRecordsByIds(ids);
    }

    /**
     * 删除开票明细信息
     * 
     * @param id 开票明细主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceRecordsById(Long id)
    {
        return invoiceRecordsMapper.deleteInvoiceRecordsById(id);
    }

    @Override
    public List<String> selectProductCode(List<String> productList) {
        return invoiceRecordsMapper.selectProductCode(productList);
    }

    @Override
    public List<Map<String, Object>> listWebInfo(String productName,String provide,String company,String status,String productGroup,String startTime) {
        return invoiceRecordsMapper.listWebInfo(productName,provide,company,status,productGroup,startTime);
    }

    @Override
    public List<String> listProvide(String provide) {
        return invoiceRecordsMapper.listProvide(provide);
    }

    @Override
    public List<Map<String, Object>> listSumMoney(String provide,String startTime) {
        return invoiceRecordsMapper.listSumMoney(provide,startTime);
    }

    @Override
    public List<Map<String, Object>> listGroupMoney(String provide,String startTime) {
        return invoiceRecordsMapper.listGroupMoney(provide,startTime);
    }

    @Override
    public List<Map<String, Object>> listOtherMoney(String provide,String startTime) {
        return invoiceRecordsMapper.listOtherMoney(provide,startTime);
    }

    @Override
    public List<Map<String, Object>> listCompanyMoney(String company, String startTime) {
        return invoiceRecordsMapper.listCompanyMoney(company,startTime);
    }

    @Override
    public Double selectAllMoney(String provide, String startTime) {
        return invoiceRecordsMapper.selectAllMoney(provide,startTime);
    }

    @Override
    public Double selectMoney(String provide, String startTime) {
        return invoiceRecordsMapper.selectMoney(provide,startTime);
    }
    @Override
    public Double selectAllMoneyPrice(String provide, String startTime) {
        return invoiceRecordsMapper.selectAllMoneyPrice(provide,startTime);
    }
    public Double selectAllMoneyPriceForAudit(String provider, String createTime) {
        return invoiceRecordsMapper.selectAllMoneyPriceForAudit(provider,createTime);
    }
    public Double selectMoneyPriceForAudit(String provider, String createTime) {
        return invoiceRecordsMapper.selectMoneyPriceForAudit(provider,createTime);
    }
    @Override
    public Double selectAllCount(String provide, String startTime) {
        return invoiceRecordsMapper.selectAllCount(provide,startTime);
    }

    @Override
    public Double selectSumProductMoney(String provide, String startTime) {
        return invoiceRecordsMapper.selectSumProductMoney(provide,startTime);
    }

    @Override
    public List<Map<String,Object>> selectSumProfitMoney(String startTime) {
        return invoiceRecordsMapper.selectSumProfitMoney(startTime);
    }

    @Override
    public List<Map<String, Object>> listProvideInfo(String productName, String provide, String company, String status, String productGroup, String startTime) {
        return invoiceRecordsMapper.listProvideInfo(productName,provide,company,status,productGroup,startTime);
    }

    @Override
    public Integer updateStatus(String startTime) {
        return invoiceRecordsMapper.updateStatus(startTime);
    }

    @Override
    public Integer deleteUpload(String time) {
        return invoiceRecordsMapper.deleteUpload(time);
    }
}
